package com.felton.springboot.shrio.service.impl;

import com.felton.springboot.shrio.dao.UserMapper;
import com.felton.springboot.shrio.entity.User;
import com.felton.springboot.shrio.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 类  名：com.felton.springboot.shrio.service.impl.UserServiceImpl
 * 类描述：todo
 * 创建人：liurui
 * 创建时间：2020/6/10 11:09
 * 修改人：
 * 修改时间：
 * 修改备注：
 *
 * @author liurui
 * @version 1.0
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findByUserName(String userName) {
        if (userName == null || userName.isEmpty()) {
            System.out.println("用户名为空！！");
            return null;
        }

        return userMapper.getUserBytUserName(userName);
    }
}
